Skip to content

BluePill and MapleMini support (No USB) #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 6, 2018

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Jan 31, 2018

Refer to #20. Will replace #61.

  • Upload method available:
    • STLink
    • Serial
  • USB not available.
  • Flash size for BluePill is possible thanks the menu (64k (default) or 128k) as requested by @Testato (Bluepill: 64KB / 128KB of flash memory size #59)
  • Arduino_Tools has been updated to be aligned with Arduino_STM32 tools. See this commit. Serial upload is more reliable with it.
  • 2 new menus for variant:
    • Generic STM32F103 series
    • Maple series
      This will allow to set properly upload method and add further variant

Test are on going. on BP. Currently, I have no Maple Mini so if someone could test it will be greatly appreciate.

BluePill tests result:

  • Both upload method for BP are functional.
  • Serial ok
  • ADC ok
  • PWM ok
  • I2C ok
  • SPI ok
  • Firmata ok

@fpistm fpistm added the new variant Add support of new bard label Jan 31, 2018
@fpistm fpistm self-assigned this Jan 31, 2018
@fpistm fpistm added this to the Next release milestone Jan 31, 2018
@fpistm fpistm added the help wanted 🙏 Extra attention is needed label Jan 31, 2018
@lacklustrlabs
Copy link
Contributor

lacklustrlabs commented Jan 31, 2018

So far I've noticed that the Optimization and Serial interface options are missing for maple mini.

Simply copying the board text and replace genF103. with Maple. works compiles.

There seems to be a problem with maple mini sketches uploaded via STLink. They do not start by themselves (not even after reset), but start working after being hooked up to a debugger.

Maple mini I2C wirescanner example works (once kickstarted by debugger)

Maple mini tests:

  • STLink upload works (if old platform.local.txt lines are removed 😄)
  • Serial ok
  • I2C ok
  • PWM ok

@fpistm fpistm force-pushed the BluPill_MapleMini branch from f5a2ed6 to d643185 Compare February 1, 2018 08:06
@fpistm
Copy link
Member Author

fpistm commented Feb 1, 2018

Thanks @lacklustrlabs
You're right, I've forgot to add those menu for Maple.
It's now corrected.
I'm wondering if I should align the pins mapping of the BluePill on the Maple one.
Maple silkscreen is the pin numbering while the BP one is the pins name but maybe I should align the pin numbering btw variant. I did not do that for BP to avoid duplicated pin for ADC due to restriction of #214

@fpistm fpistm force-pushed the BluPill_MapleMini branch 2 times, most recently from 9eb71f6 to d0788b9 Compare February 1, 2018 09:58
@lacklustrlabs
Copy link
Contributor

lacklustrlabs commented Feb 1, 2018

I'm wondering if I should align the pins mapping of the BluePill on the Maple one.

Imho - It would be best if maple mini could use Dx notation while BluePill uses Pxy (If possible)

The problem with MM (both BP & MM) stlink autostart persists. Blinky does not blink unless first connected to a debugger, after that it works standalone. (have not yet tested serial upload)

@fpistm fpistm force-pushed the BluPill_MapleMini branch from d0788b9 to 276fff9 Compare February 1, 2018 10:43
@fpistm
Copy link
Member Author

fpistm commented Feb 1, 2018

Imho - It would be best if maple mini could use Dx notation while BluePill uses Pxy (If possible)

Core is able to deal with both notation.
ex:
BP: D0 == PB9
MM: D0 == PB11

For STLink issue I do not have this issue with BP.
What is your Boot0/1 config?

@lacklustrlabs
Copy link
Contributor

Core is able to deal with both notation.

Yes, i know. It was for human-readability purposes. By tradition pin numbers (Dx) means nothing to BP users. Their silkscreen is using Pxy notation.

I've never touched the Boot0/1 config, i know my current setting works for the maple core and my temporary rebased MM&BP branch for this core. But i suspect that the problem may be the bootloader (or possibly lack of it). I have not used it much since I switched over to STLink.
I'll investigate some more...

Btw, i would not object to a MM&BP bootloader menu with the options None(stlink), Original (17kb ram) and new (20kb ram)

@fpistm
Copy link
Member Author

fpistm commented Feb 1, 2018

Yes, i know. It was for human-readability purposes. By tradition pin numbers (Dx) means nothing to BP users. Their silkscreen is using Pxy notation.

Ok. So, nothing to handle as all notations are manage.

Btw, i would not object to a MM&BP bootloader menu with the options None(stlink), Original (17kb ram) and new (20kb ram)

I do not understand well your request. Could you explain me what you would behind those menu?

@lacklustrlabs
Copy link
Contributor

lacklustrlabs commented Feb 1, 2018

Just like the maple stm32 core:
The "no bootloader" option would place the bin at 0x8000000 (as stlink upload does now)
'Original' at 0x8005000 and
'Bootloader 2.0' at 0x8002000

@fpistm
Copy link
Member Author

fpistm commented Feb 1, 2018

Ok. But currently, I will not have time to handle this. This could be part of future PR for those variants.
Including USB (CDC, DFU,..)
Goal of this PR is to provide basic support.

@rogerclarkmelbourne
Copy link

I'm not sure how many people would use an option which was Maple Mini with No Bootloader

The bootloader comes preinstalled with the Maple Mini, and hardly anyone reloads the board via STLink etc as it doesnt have a separate pin header for STLink like the Blue Pill does

@Testato
Copy link
Contributor

Testato commented Feb 1, 2018

Yes, but it is better havr an official basic support and after start to work on usb.

Maple have the serial like Bluepill, it is enough gor starting imho

@fpistm
Copy link
Member Author

fpistm commented Feb 2, 2018

I understand @rogerclarkmelbourne
This will come... I will get MM in march then I could go further.
Anyway if some user could help, they are welcome ;)

@lacklustrlabs
Copy link
Contributor

bluepill is always using ldscript.ld, regardless of flash size.

boards.txt:

GenF103.menu.flash.C8=64k (default)
GenF103.menu.flash.C8.upload.maximum_size=65536
-GenF103.menu.flash.C8.build.ldscript1=ldscript.ld
+GenF103.menu.flash.C8.build.ldscript=ldscript.ld
GenF103.menu.flash.CB=128k
GenF103.menu.flash.CB.upload.maximum_size=131072
-GenF103.menu.flash.CB.build.ldscript1=ldscript_cb.ld
+GenF103.menu.flash.CB.build.ldscript=ldscript_cb.ld

@fpistm
Copy link
Member Author

fpistm commented Feb 2, 2018

Oops... sorry wrong commit... I've made a test and commit it by error during the rebase. Nice shot ;)

@fpistm fpistm force-pushed the BluPill_MapleMini branch 2 times, most recently from 55cc2ff to d93d28e Compare February 2, 2018 16:38
fpistm added 3 commits March 6, 2018 09:35
Signed-off-by: Frederic.Pillon <[email protected]>
Some BluePill have 128k instead of 64k.
Fix stm32duino#59

Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
@fpistm fpistm force-pushed the BluPill_MapleMini branch from 95e59e9 to 996c194 Compare March 6, 2018 08:43
Signed-off-by: Frederic.Pillon <[email protected]>
@fpistm fpistm merged commit b113598 into stm32duino:master Mar 6, 2018
@fpistm fpistm deleted the BluPill_MapleMini branch March 6, 2018 08:52
@gdamjan
Copy link

gdamjan commented Mar 6, 2018

great to have this merged.

anyone knows where to subscribe to track the addition of USB bootloader support?
found it
(it appeared in between the time I've read this bug and had the chance to write a comment)

@fpistm fpistm modified the milestones: Next release, 1.2.0 Mar 15, 2018
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull request Apr 10, 2019
BluePill and MapleMini support (No USB)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted 🙏 Extra attention is needed new variant Add support of new bard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants